package practicedemo34;

public class GirlFriend {
    private String name;
    private int age;
    private String fun;


    public GirlFriend() {
    }

    public GirlFriend(String name, int age, String fun) {
        this.name = name;
        if (age<18){
            System.out.println("不合法的女朋友年龄");
        } else {
            this.age = age;
        }
        this.fun = fun;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return age
     */
    public int getAge() {
        return age;
    }

    /**
     * 设置
     * @param age
     */
    public void setAge(int age) {
        this.age = age;
    }

    /**
     * 获取
     * @return fun
     */
    public String getFun() {
        return fun;
    }

    /**
     * 设置
     * @param fun
     */
    public void setFun(String fun) {
        this.fun = fun;
    }
}
